public class Test {
    public static void main(String[] args) {
        String str1="hello";
        String str2="hello";
        System.out.println(str1==str2);
        String str3=new String("hello");
        String str4=new String("hello");
        System.out.println(str3==str4);
        char[] ch={'h','e','l','l','o'};
        String s=new String(ch);
        System.out.println(s);
        System.out.println(s==str1);

    }
}
